home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK2.toast / Development Kits (Disc 2) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Printer Drivers… / LaserWriter--custom dialogs / ChooserSupport.r < prev    next >
Encoding:
Text File  |  1995-04-10  |  3.5 KB  |  151 lines  |  [TEXT/MPS ]

  1. /*
  2.     ChooserSupport.r - other resources needed in order for driver to work
  3.     with the Chooser.
  4.     
  5.    12/18/93 - dmh - Updated for the b3 seed.
  6.     9/13/93 - dmh - Updated for the b2 seed.
  7.     
  8.     Copyright © 1992-1994 Apple Computer, Inc.
  9.     All rights reserved.
  10. */
  11.  
  12. #include "Types.r"
  13. #include "SysTypes.r"
  14. #include "PrintingResTypes.r"
  15.  
  16. //--------------------------------------------------------------------------------------------
  17. // THINGS TO CONTROL THE DEFAULT CHOOSING MECHANSIM
  18. //--------------------------------------------------------------------------------------------
  19.  
  20. // what type of communication does this device use (this is the default, as the actual
  21. // value can be found in the desktop printer).
  22. resource 'look' (-4096, sysheap, purgeable) {
  23.     1,                // use the first in our list by default
  24.     
  25.     {
  26.     "AppleTalk",    -4096,        isAppleTalk,                "LaserWriter";
  27.     "Servers",        -4095,        isAppleTalk+isPrinterShare,    "LaserWriterIS";
  28.     "Serial",        -4094,        iconCells,                    "Modem Port";
  29.     };
  30. };
  31.  
  32.  
  33. resource 'comm' (-4096, sysheap, purgeable) {
  34.     PAP
  35.         {
  36.         8,
  37.         "",
  38.         0, 0, 0, 0
  39.         };
  40. };
  41.  
  42. resource 'comm' (-4095, sysheap, purgeable) {
  43.     PrinterShare
  44.         {
  45.         "",
  46.         0
  47.         };
  48. };
  49.  
  50. resource 'comm' (-4094, sysheap, purgeable) {
  51.     Serial
  52.         {
  53.         baud57600,        /* Output baud rate */
  54.         noParity,        /* Output parity */
  55.         oneStop,        /* Output stop bits */
  56.         data8,            /* Output data size */
  57.         0x00010000,        /* Output handshaking */
  58.         0x00000000,
  59.         baud57600,        /* Input baud rate */
  60.         noParity,        /* Input parity */
  61.         oneStop,        /* Input stop bits */
  62.         data8,            /* Input data bits */
  63.         0,                /* Input handshaking */
  64.         0,
  65.         1024,            /* Input buffer size */
  66.         ".AIn",            /* Input driver name */
  67.         ".AOut"            /* Output driver name */
  68.         };
  69. };
  70.  
  71.  
  72.  
  73. //--------------------------------------------------------------------------------------------
  74. // STANDARD CHOOSER PACK STUFF
  75. //--------------------------------------------------------------------------------------------
  76.  
  77. // NBP Lookup type (maxed out so resource file won't need updating)
  78. resource 'STR ' (-4096, sysheap, purgeable)
  79. {
  80.     "XXXXXXXXXXXXXXXXXXXXXX";
  81. };
  82.  
  83. // NBP timeout value
  84. type 'GNRL'
  85. {
  86.     byte;    // timeout
  87.     byte;    // retries
  88. };
  89.  
  90. resource 'GNRL' (-4096, sysheap, purgeable)
  91. {
  92.     11,
  93.     5
  94. };
  95.  
  96. // title string (we put the pop-up control here, so we don't want a title)
  97. resource 'STR ' (-4091, sysheap, purgeable)
  98. {
  99.     "";
  100. };
  101.  
  102. // "left" button title
  103. resource 'STR ' (-4093, sysheap, purgeable)
  104. {
  105.     "Create";
  106. };
  107.  
  108. // rectangle list
  109. resource 'nrct' (-4096, sysheap, purgeable) {
  110.     {
  111.     {112, 251, 132, 311};            // left button
  112.     {0,0,0,0};                        // right button
  113.     {-101, 180, -101+20, 400};        // on button (location of device list - popup is placed here)
  114.     {0,0,0,0};                        // off button
  115.     {0,0,0,0};                        // button label
  116.     };
  117. };
  118.  
  119. // Menu used to select between direct connect, AppleTalk, and Servers
  120. resource 'MENU' (-4096, sysheap, purgeable)
  121. {
  122.     -4096,
  123.     textMenuProc,
  124.     0xFFFFFFFF,    
  125.     enabled,
  126.     "",
  127.     {
  128.     }
  129. };
  130.  
  131. // Pop-up control used to select between direct connect printers and those being shared on the network
  132. resource 'CNTL' (-4096, sysheap, purgeable)
  133. {
  134.     {0, 0, 20, 205},                            // zero based control location
  135.     0,                                            // Title options 0 = Left justified
  136.     visible,                                    // Should we display the control?
  137.     100,                                        // Title Width
  138.     -4096,                                        // 'MENU' to display
  139.     popupMenuCDEFproc+popupFixedWidth,            // CDEF = CDEFID * 16 + varCode
  140.     0,                                             // refCon = ResType to append = None
  141.     "Connect via:"                                // Control title
  142. };
  143.  
  144. resource 'DITL' (-4096, sysheap, purgeable) 
  145. {
  146.     {
  147.         {3, 250, 23, 250 + 205}, 
  148.             Control {enabled, -4096},
  149.     };
  150. };
  151.